package com.shuke.medical.insure.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author woo hua
 * @date 2023-03-31 16:12
 */
@Data
@NoArgsConstructor
@ApiModel(value="获取人员基本信息")
public class GetChsPersonBaseInfoNoAnnotateVO implements Serializable {

    @ApiModelProperty("基本信息")
    private Baseinfo baseinfo;

    @ApiModelProperty("参保信息")
    private List<Insuinfo> insuinfo;

    @ApiModelProperty("身份信息")
    private List<Idetinfo> idetinfo;

    @Data
    @NoArgsConstructor
    @ApiModel("基本信息")
    public static class Baseinfo {

        @ApiModelProperty("人员编号")
        private String psnNo;

        @ApiModelProperty("人员证件类型")
        private String psnCertType;

        @ApiModelProperty("证件号码")
        private String certno;

        @ApiModelProperty("人员姓名")
        private String psnName;

        @ApiModelProperty("性别")
        private String gend;

        @ApiModelProperty("民族")
        private String naty;

        @ApiModelProperty("出生日期 格式：yyyy-MM-dd")
        //@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
        @DateTimeFormat(pattern = "yyyy-MM-dd")
        @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
        private LocalDate brdy;

        @ApiModelProperty("年龄")
        private Integer age;
    }

    @Data
    @NoArgsConstructor
    @ApiModel("参保信息")
    public static class Insuinfo {

        @ApiModelProperty(value = "余额")
        private String balc;

        @ApiModelProperty(value = "险种类型")
        private String insutype;

        @ApiModelProperty(value = "人员类别")
        private String psnType;

        @ApiModelProperty(value = "公务员标志")
        private String cvlservFlag;

        @ApiModelProperty(value = "参保地医保区划")
        private String insuplcAdmdvs;

        @ApiModelProperty(value = "单位名称")
        private String empName;
    }

    @Data
    @NoArgsConstructor
    @ApiModel("身份信息")
    public static class Idetinfo {

        @ApiModelProperty(value = "人员身份类别")
        private String psnIdetType;

        @ApiModelProperty(value = "人员类别等级")
        private String psnTypeLv;

        @ApiModelProperty(value = "备注")
        private String memo;

        @ApiModelProperty(value = "开始时间 格式：yyyy-MM-dd HH:mm:ss ")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private LocalDateTime begntime;

        @ApiModelProperty(value = "结束时间 格式：yyyy-MM-dd HH:mm:ss ")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private LocalDateTime endtime;
    }
}
